<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterUserRole extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $sql = "ALTER TABLE `admin_user_role` ADD COLUMN `creator` int (11) DEFAULT 0 after `operator`";
        DB::statement($sql);
        $sql = "ALTER TABLE `master_user_role` ADD COLUMN `creator` int (11) DEFAULT 1 after `operator`";
        DB::statement($sql);
        $sql = "ALTER TABLE `admin_user` ADD COLUMN `creator` int (11) DEFAULT 0 after `role`";
        DB::statement($sql);
        $sql = "ALTER TABLE `master_user` ADD COLUMN `creator` int (11) DEFAULT 0 after `role`";
        DB::statement($sql);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
